Fix deprecations for GtkIconInfo
authorJasper St. Pierre <jstpierre@mecheye.net>
Sat, 16 Feb 2013 00:35:44 +0000 (19:35 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sat, 16 Feb 2013 00:48:56 +0000 (19:48 -0500)
gtk/gtkcolorswatch.c
gtk/gtkfilesystem.c
gtk/gtkiconfactory.c
gtk/gtkiconhelper.c
gtk/gtkicontheme.c
gtk/gtknumerableicon.c
gtk/gtkrecentmanager.c
tests/testicontheme.c

index e33a3f601f137be9d7c9200b0ff40a387416db96..c6081d7907f1adadc9339f088297f497801fbf5b 100644 (file)
@@ -228,7 +228,7 @@ swatch_draw (GtkWidget *widget,
           g_object_unref (pixbuf);
         }
 
-      gtk_icon_info_free (icon_info);
+      g_object_unref (icon_info);
     }
 
   cairo_restore (cr);
index 05ab5a1ec25d44d652af7a4c12dd2485c5e025a6..553e007e08bc58e717309e922ea90e4513c6cd69 100644 (file)
@@ -1165,7 +1165,7 @@ get_pixbuf_from_gicon (GIcon      *icon,
     return NULL;
 
   pixbuf = gtk_icon_info_load_icon (icon_info, error);
-  gtk_icon_info_free (icon_info);
+  g_object_unref (icon_info);
 
   return pixbuf;
 }
index a3bfea78b7974bcc869870022a368cd0848216e3..b40267335b0a78c0a1ec613de399e2a2422de375 100644 (file)
@@ -1569,7 +1569,7 @@ render_icon_name_pixbuf (GtkIconSource    *icon_source,
       if (info)
         {
           tmp_pixbuf = gtk_icon_info_load_icon (info, &error);
-          gtk_icon_info_free (info);
+          g_object_unref (info);
         }
       else
         tmp_pixbuf = NULL;
index 37ba5811c81b476c7287c3f6da69f8183fe9a3f3..58ae8a15db776402e7195525b871e10672a5192e 100644 (file)
@@ -263,7 +263,7 @@ ensure_pixbuf_for_icon_name_or_gicon (GtkIconHelper *self,
   self->priv->rendered_pixbuf = ensure_stated_icon_from_info (self, context, info);
 
   if (info)
-    gtk_icon_info_free (info);
+    g_object_unref (info);
 }
 
 static void
index 42e86a2ca627b59c7b76c1f07b31646a70f182ad..73d8ba7d0fef2324c96dca4aaca822f57564fed7 100644 (file)
@@ -1444,7 +1444,7 @@ ensure_lru_cache_space (GtkIconTheme *icon_theme)
                    g_list_length (priv->info_cache_lru)));
 
       priv->info_cache_lru = g_list_delete_link (priv->info_cache_lru, l);
-      gtk_icon_info_free (icon_info);
+      g_object_unref (icon_info);
     }
 }
 
@@ -1465,7 +1465,7 @@ add_to_lru_cache (GtkIconTheme *icon_theme,
   ensure_lru_cache_space (icon_theme);
   /* prepend new info to LRU */
   priv->info_cache_lru = g_list_prepend (priv->info_cache_lru,
-                                        gtk_icon_info_copy (icon_info));
+                                        g_object_ref (icon_info));
 }
 
 static void
@@ -1500,7 +1500,7 @@ remove_from_lru_cache (GtkIconTheme *icon_theme,
                    g_list_length (priv->info_cache_lru)));
 
       priv->info_cache_lru = g_list_remove (priv->info_cache_lru, icon_info);
-      gtk_icon_info_free (icon_info);
+      g_object_unref (icon_info);
     }
 }
 
@@ -1614,7 +1614,7 @@ choose_icon (GtkIconTheme       *icon_theme,
                    icon_info->key.size, icon_info->key.flags,
                    g_hash_table_size (priv->info_cache)));
 
-      icon_info = gtk_icon_info_copy (icon_info);
+      icon_info = g_object_ref (icon_info);
       remove_from_lru_cache (icon_theme, icon_info);
 
       return icon_info;
@@ -1937,7 +1937,7 @@ gtk_icon_theme_load_icon (GtkIconTheme         *icon_theme,
     }
 
   pixbuf = gtk_icon_info_load_icon (icon_info, error);
-  gtk_icon_info_free (icon_info);
+  g_object_unref (icon_info);
 
   return pixbuf;
 }
@@ -3117,7 +3117,7 @@ gtk_icon_info_finalize (GObject *object)
 
   if (icon_info->loadable)
     g_object_unref (icon_info->loadable);
-  g_slist_free_full (icon_info->emblem_infos, (GDestroyNotify) gtk_icon_info_free);
+  g_slist_free_full (icon_info->emblem_infos, (GDestroyNotify) g_object_unref);
   if (icon_info->pixbuf)
     g_object_unref (icon_info->pixbuf);
   if (icon_info->cache_pixbuf)
@@ -3509,7 +3509,7 @@ proxy_pixbuf_destroy (guchar *pixels, gpointer data)
   if (icon_theme != NULL)
     ensure_in_lru_cache (icon_theme, icon_info);
 
-  gtk_icon_info_free (icon_info);
+  g_object_unref (icon_info);
 }
 
 /**
@@ -3576,7 +3576,7 @@ gtk_icon_info_load_icon (GtkIconInfo *icon_info,
                              gdk_pixbuf_get_height (icon_info->pixbuf),
                              gdk_pixbuf_get_rowstride (icon_info->pixbuf),
                              proxy_pixbuf_destroy,
-                             gtk_icon_info_copy (icon_info));
+                             g_object_ref (icon_info));
 
   return icon_info->proxy_pixbuf;
 }
@@ -3738,7 +3738,7 @@ proxy_symbolic_pixbuf_destroy (guchar *pixels, gpointer data)
   if (icon_theme != NULL)
     ensure_in_lru_cache (icon_theme, icon_info);
 
-  gtk_icon_info_free (icon_info);
+  g_object_unref (icon_info);
 }
 
 static GdkPixbuf *
@@ -3757,7 +3757,7 @@ symbolic_cache_get_proxy (SymbolicPixbufCache *symbolic_cache,
                              gdk_pixbuf_get_height (symbolic_cache->pixbuf),
                              gdk_pixbuf_get_rowstride (symbolic_cache->pixbuf),
                              proxy_symbolic_pixbuf_destroy,
-                             gtk_icon_info_copy (icon_info));
+                             g_object_ref (icon_info));
 
   return symbolic_cache->proxy_pixbuf;
 }
@@ -4834,7 +4834,7 @@ _gtk_icon_theme_check_reload (GdkDisplay *display)
  *
  * Return value: (transfer full): a #GtkIconInfo structure containing 
  *     information about the icon, or %NULL if the icon 
- *     wasn't found. Free with gtk_icon_info_free()
+ *     wasn't found. Unref with g_object_unref()
  *
  * Since: 2.14
  */
index a1131f576e1649cfd5e2fd05510771e6a3de5763..e46547174a6e0b722ad00fd532d38af7ec6b02b7 100644 (file)
@@ -215,7 +215,7 @@ draw_from_gicon (GtkNumerableIcon *self)
     return NULL;
 
   pixbuf = gtk_icon_info_load_icon (info, NULL);
-  gtk_icon_info_free (info);
+  g_object_unref (info);
 
   if (pixbuf == NULL)
     return NULL;
index 1c5a1882329a59209d964ea9acb8594e36f59098..310efe077126223be5bb33dbbcedb2a548909a4d 100644 (file)
@@ -1944,7 +1944,7 @@ get_icon_for_mime_type (const char *mime_type,
     return NULL;
 
   pixbuf = gtk_icon_info_load_icon (info, NULL);
-  gtk_icon_info_free (info);
+  g_object_unref (info);
 
   return pixbuf;
 }
index bc0ee6959fb326a94d4db6bdfd0af0bcfccb5e50..d294a47b343b3b100baac8213e2910d72d44c60c 100644 (file)
@@ -231,7 +231,7 @@ main (int argc, char *argv[])
          if (display_name)
            g_print ("Display name: %s\n", display_name);
          
-         gtk_icon_info_free (icon_info);
+         g_object_unref (icon_info);
        }
     }
   else